package com.fallingmanage.myapp.serviceImpl;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.fallingmanage.myapp.domain.User;
import com.fallingmanage.myapp.newService.RegisteredSignInService;
import com.fallingmanage.myapp.repository.JhiUserRepository;
import com.fallingmanage.myapp.util.Result;

import java.util.Optional;

/**
 * Service Implementation for managing {@link Area}.
 */
@Service
@Transactional
public class RegisteredSignInServiceImpl implements RegisteredSignInService {

    private final Logger log = LoggerFactory.getLogger(RegisteredSignInServiceImpl.class);

  private final JhiUserRepository userRepository;

  public RegisteredSignInServiceImpl(JhiUserRepository userRepository) {
      this.userRepository = userRepository;
  }

    
	@Override
	public Result accountNumberExistence(String phone) {
		User userData = userRepository.findByLogin(phone);
		if (userData==null) {
			return Result.fail("error");
		}
		return Result.suc();
	}



}
